package com.fowo.api.flow.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @fileName: ProcessTemplates
 * @Description: 代码目的，作用，如何工作
 * @Author: pzh
 * @Date: 2023/3/27 0027 10:42
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "process_templates")
@Builder
public class ProcessTemplates implements Serializable {


    /**
    * 审批摸板ID
    */
    @TableField(value = "`template_id`")
    @TableId
    @Schema(title = "审批摸板ID")
    private String templateId;

    @TableField(exist = false)
    private String formId;

    @TableField(exist = false)
    private String formName;

    /**
    * 摸板名称
    */
    @TableField(value = "`template_name`")
    @Schema(title = "摸板名称")
    private String templateName;

    /**
     * 数据表名
     */
    @TableField(value = "`table_name`")
    @Schema(title = "数据表名")
    private String tableName;

    /**
     * 数据表名
     */
    @TableField(value = "`process_code`")
    @Schema(title = "钉钉表单模板的code")
    private String processCode;


    /**
     * 分组id
     */
    @TableField(value = "`group_id`")
    @Schema(title = "分组id")
    private Long groupId;

    /**
    * 摸板表单
    */
    @TableField(value = "`form_items`")
    @Schema(title = "摸板表单")
    private String formItems;

    /**
     * 基础设置
     */
    @TableField(value = "`settings`")
    @Schema(title = "基础设置")
    private String settings;

    /**
     * 流程信息
     */
    @TableField(value = "`process`")
    @Schema(title = "流程信息")
    private String process;

    /**
    * 图标
    */
    @TableField(value = "`icon`")
    @Schema(title = "图标")
    private String icon;

    /**
    * 图标背景色
    */
    @TableField(value = "`background`")
    @Schema(title = "图标背景色")
    private String background;

    /**
     * 通知
     */
    @TableField(value = "`notify`")
    @Schema(title = "通知")
    private String notify;

    /**
    * 谁能提交
    */
    @TableField(value = "`who_commit`")
    @Schema(title = "谁能提交")
    private String whoCommit;

    /**
    * 谁能编辑
    */
    @TableField(value = "`who_edit`")
    @Schema(title = "谁能编辑")
    private String whoEdit;

    /**
    * 谁能导出数据
    */
    @TableField(value = "`who_export`")
    @Schema(title = "谁能导出数据")
    private String whoExport;

    /**
     * 备注说明
     */
    @TableField(value = "`remark`")
    @Schema(title = "备注说明")
    private String remark;

    /**
    * 是否已停用
    */
    @TableField(value = "`is_stop`")
    @Schema(title = "是否已停用")
    private Boolean isStop;


    @TableField(exist = false)
    private String logo;

    @TableField(exist = false)
    private String processDefinitionId;

    /**
     * 创建时间
     */
    @TableField(value = "`create_time`")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(title = "创建时间")
    private java.util.Date createTime;

    /**
     * 创建人
     */
    @TableField(value = "`create_user`")
    @Schema(title = "创建人")
    private Long createUser;

    /**
     * 更新时间
     */
    @TableField(value = "`last_update_time`")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(title = "更新时间")
    private java.util.Date lastUpdateTime;

    /**
     * 更新人
     */
    @TableField(value = "`last_update_user`")
    @Schema(title = "更新人")
    private Long lastUpdateUser;

    /**
     * 删除标记
     */
    @TableField(value = "`del_flag`")
    @TableLogic
    @Schema(title = "删除标记")
    private Boolean delFlag;
}
